﻿@model Back_end.Models.Complaint

@{
    ViewBag.Title = "删除";
    var pp = Model.PicturePath == null ? "" : Model.PicturePath;
    var tp = Model.Tag == null ? "" : Model.Tag;
    var pps = pp.Split('|');
    var tps = tp.Split('|');
}

<h2>Delete</h2>

<h3>Are you sure you want to delete this?</h3>
<div>
    <h4>Complaint</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.UserName)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.UserName)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.PublishedDate)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.PublishedDate)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Text)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Text)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.PicturePath)
        </dt>

        <dd>
            @foreach (string path in pps)
			{ <img src=@path class="img-thumbnail"> }
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Location)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Location)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Tag)
        </dt>

        <dd>
            @foreach (var tag in tps)
            { <span class="label label-info" style="margin-right:10px">@tag </span> }
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.AllowedPublished)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.AllowedPublished)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.HadProcessed)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.HadProcessed)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Review)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Review)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Weight)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Weight)
        </dd>

    </dl>

    @using (Html.BeginForm()) {
        @Html.AntiForgeryToken()

        <div class="form-actions no-color">
            <input type="submit" value="Delete" class="btn btn-default" /> |
            @Html.ActionLink("返回列表", "Index")
        </div>
    }
</div>
